package day4.Exer;

import java.util.HashMap;
import java.util.Scanner;

public class Exer6 {
    public static void main(String[] args) {
        HashMap a=new HashMap();
        a.put("书","book");
        a.put("桌子","desk");
        a.put("书包","bag");
        a.put("钢笔","pen");
        a.put("纸","paper");
        System.out.println("请输入要查找的内容");
        Scanner in=new Scanner(System.in);
        String b=in.next();
        if(a.containsValue(b)){
           for(Object o:a.keySet()){
                    if(a.get(o).equals(b)){
                        System.out.println(o.toString());
                    }
           }
        }else{
            System.out.println(b+"未找到对应的内容");
        }
    }
}
